/**
 *
 * 受限空间安全作业票
 * type: span/ span标签； input: el-input； select: el-select
 *
 */

export const hoistFormItems = () => {
  return [
    {
      label: "申请部门",
      prop: "specialApplicationDept",
      type: "span",
      options: [
        /* 相同的选择项列表 */
      ],
    },
    {
      label: "申请人",
      prop: "createByName",
      type: "span",
      options: [
        /* 相同的选择项列表 */
      ],
    },
    {
      label: "受限空间名称",
      prop: "restrictedSpaceName",
      type: "input",
      options: [],
      rules: [
        { required: true, errorMessage: "请输入受限空间名称", trigger: "blur" },
      ],
    },
    {
      label: "作业申请时间",
      prop: "createTime",
      type: "datetime",
      options: [],
      rules: [
        { required: true, errorMessage: "请选择作业申请时间", trigger: "change" },
      ],
    },
    {
      label: "受限空间内原有介质名称",
      prop: "mediumName",
      type: "input",
      options: [],
      rules: [
        {
          required: true,
          errorMessage: "请输入受限空间内原有介质名称",
          trigger: "blur",
        },
      ],
    },
    {
      label: "作业内容",
      prop: "specialWorkInfo",
      type: "input",
      options: [],
      rules: [{ required: true, errorMessage: "请输入作业内容", trigger: "blur" }],
    },
    {
      label: "作业单位",
      prop: "workUnitId",
      type: "treeSelect",
      options: [],
      rules: [{ required: true, errorMessage: "请选择作业单位", trigger: "change" }],
    },
    {
      label: "作业人负责人",
      prop: "workPrincipal",
      type: "select",
      options: [],
      rules: [
        { required: true, errorMessage: "请选择作业负责人", trigger: "change" },
      ],
    },
    {
      label: "作业人",
      prop: "workPerson",
      type: "select",
      multiple: true,
      options: [],
      rules: [{ required: true, errorMessage: "请选择作业人", trigger: "change" }],
    },
    {
      label: "监护人",
      prop: "workGuardian",
      type: "select",
      options: [],
      rules: [{ required: true, errorMessage: "请选择监护人", trigger: "change" }],
    },

    {
      label: "作业实施时间",
      prop: "putTime",
      type: "daterange",
      options: [],
      rules: [
        { required: true, errorMessage: "请选择作业实施时间", trigger: "change" },
      ],
    },
    {
      label: "关联其他特殊作业",
      prop: "associateOthers",
      checkBoxArr: [],
      type: "checkbox",
      options: [
        { value: "临时用电", text: "临时用电" },
        { value: "高处作业", text: "高处作业" },
        { value: "动火作业", text: "动火作业" },
        { value: "动土", text: "动土" },
        { value: "盲板抽堵", text: "盲板抽堵" },
        { value: "断路", text: "断路" },
        { value: "吊装", text: "吊装" },
        { value: "交叉作业", text: "交叉作业" },
      ],
      rules: [
        {
          required: true,
          errorMessage: "请选择关联其他特殊作业",
          trigger: "change",
        },
      ],
    },

    {
      label: "风险辨识",
      prop: "riskIdentification",
      checkBoxArr: [],
      type: "checkbox",
      options: [
        { value: "火灾", text: "火灾" },
        { value: "燃爆", text: "燃爆" },
        { value: "中毒", text: "中毒" },
        { value: "缺氧窒息", text: "缺氧窒息" },
        { value: "机械伤害", text: "机械伤害" },
        { value: "物体打击", text: "物体打击" },
        { value: "高处坠落", text: "高处坠落" },
        { value: "淹溺", text: "淹溺" },
        { value: "灼烫", text: "灼烫" },
        { value: "触电", text: "触电" },
        { value: "坍塌", text: "坍塌" },
        { value: "噪音", text: "噪音" },
        { value: "高/低温", text: "高/低温" },
        { value: "不利天气", text: "不利天气" },
        { value: "其他", text: "其他" },
      ],
      rules: [{ required: true, errorMessage: "请选择风险辨识", trigger: "change" }],
    },

    {
      label: "作业票号",
      prop: "jobNumber",
      checkBoxArr: [],
      type: "input",
      options: [],
      disabled: true,
    },
  ];
};
